﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Intellisense
{
    internal static class Constants
    {
        internal static readonly string StartElementTagPattern = "<";
        internal static readonly string StartElementPattern = "<\\s*>|<\\s+|<\\s*(?<taskname>\\w+)\\s*(?<propertiesText>(\\w+\\s*=*\\s*((\".*?\")|(\".*))*\\s*)*)(?<closeTag>(/>|>)*)";
        internal static readonly string StartElementPatternTaskNameGroupName = "taskname";
        internal static readonly string StartElementPatternPropertiesTextGroupName = "propertiesText";
        internal static readonly string StartElementPatternCloseTagGroupName = "closeTag";

        internal static readonly string AttributesPattern = "(?<propertyName>\\w+)\\s*=*\\s*((\".*?\")|(\".*))*";
        internal static readonly string AttributesPatternPropertyNameGroupName = "propertyName";
        internal static readonly string EndElementPattern = "</{0}\\s*>";
        
        internal static readonly string XmlDeclarationPattern = "<\\?\\bxml\\b\\s*(\\w+\\s*=\\s*\".*?\"\\s*)*\\?>";
        internal static readonly string CommentPattern = "(<!--.*?(-->))|(<!--.*)";
        internal static readonly string CDATAPattern = "<!\\[\\bCDATA\\b\\[((.*?\\]\\s*?\\]\\s*>)|(.*))";

        internal static readonly string PropertyPattern = "\\w+\\s*=*\\s*((\".*?\")|(\".*))*";

    }
}
